<!DOCTYPE html>
<html>
<#include "../head.html">
    <body>
    <div class="mc">
        <div class="mc-l">
            <!--左侧导航---{-->
            <div id="navPanelContainer">
                <div class="system-logo cd"></div>
                <!--管理员信息---{-->
                <#include "../adminInfo.html">
                    <!--管理员信息---}-->
                    <div class="nav-wrap">
                        <#include "left.html">
                    </div>
            </div>
            <!--左侧导航---}-->
        </div>
        <div class="mc-m">
            <div class="navToggle"></div>
        </div>
        <div class="mc-r">
            <!--顶部导航---{-->
            <#include "../topNav.html">
                <!--顶部导航---}-->

                <!--面包屑导航---{-->
                <#assign moduleName="新增跟踪记录">
                    <#include "banner.html">
                        <!--面包屑导航---}-->

                        <!--工具栏--{-->
                        <div id="toolbar" class="clearfix">
                            <div class="toolbor-module search">
                                <input type="button" class="input-button return" value="返回" onclick="location.href='/admin/crm/queryTrackRecord.html'">
                            </div>
                        </div>
                        <!--工具栏--}-->

                        <div id="main" class="clearfix">
                            <form id="cust" name="form1" method="post" action="/admin/crm/addTrackRecord.html">
                                <div class="valBox w750 h300">
                                    <div class="top">
                                        <strong>新增跟踪记录</strong>
                                    </div>
                                    <div class="val clearfix">
                                        <ul>

                                            <li>
                                                <div class="title">客户ID：</div>
                                                <div class="v">
                                                    ${custId}
                                                    <input id="custId" type="hidden"  name="custId" style="width:250px;" value="${(custId!0)?c}"></input>
                                                </div>
                                            </li>
                                            <li>
                                                <div class="title">姓名：</div>
                                                <div class="v">
                                                    ${custName}
                                                    <input id="custName" type="hidden" name="custName" style="width:250px;"  value="${custName}"/>
                                                </div>
                                            </li>


                                            <li>
                                                <div class="title">主题：</div>
                                                <div class="v">
                                                    <input id="subject" type="text"  name="subject" style="width:250px;"></input>
                                                </div>
                                            </li>

                                            <li>
                                                <div class="title">内容：</div>
                                                <div class="v">
                                                    <textarea id="content" name="content" style="width:450px;height: 150px"></textarea>
                                                </div>
                                            </li>
                                        </ul>
                                        <div class="other">
                                            <input type="hidden"  name="actionType" value="add" />
                                            <input type="submit"  name="reset" value="新增" class="input-button confirm"/>
                                        </div>
                                    </div>
                                </div>

                            </form>

                        </div>
        </div>
    </div>
    <div class="mc-b">
        <#include "../foot.html">
    </div>
    <#include "../jsPage.html">
        <script>
            $(function() {
//--------------------------------------------------【钱内助跟踪记录是否存在验证】
                //表单验证
                var bCustId=false,
                    bSubject=false;
                bContent=false;
                //表单验证
                $("#subject").change(function() {
                    var subject = $(this).val();
                    $(this).css("border","").next("span").remove();
                    if(subject==""){
                        $(this).css({
                            "border":"1px solid red"
                        }).after('<span style="color:red">&nbsp;&nbsp;主题不能为空!</span>');
                        bSubject=false;
                        return false;
                    }else{
                        bSubject=true;
                    }
                });

                //表单验证
                $("#content").change(function() {
                    var content = $(this).val();
                    $(this).css("border","").next("span").remove();
                    if(content==""){
                        $(this).css({
                            "border":"1px solid red"
                        }).after('<span style="color:red">&nbsp;&nbsp;内容不能为空!</span>');
                        bContent=false;
                        return false;
                    }else{
                        bContent=true;
                    }
                });

                $("#cust").submit(function(){
                    if(!(bSubject&&bContent)){
                        $("#subject,#content").change();
                        return false;
                    }

                });


            });
        </script>
    </body>
</html>